Page({
    data: { keyword: '' },
    onBack() { wx.navigateBack(); },
    onInput(e) { this.setData({ keyword: e.detail.value }); },
    onSearch() { wx.showToast({ title: `搜索：${this.data.keyword||''}`, icon: 'none' }); },
    onCreate() { wx.navigateTo({ url: '/pages/passcode/get/index' }); },
    openDetail(e) {
        const d = e.currentTarget.dataset;
        const qs = `code=${encodeURIComponent(d.code)}&name=${encodeURIComponent(d.name)}&start=${encodeURIComponent(d.start)}&end=${encodeURIComponent(d.end)}&sender=${encodeURIComponent(d.sender)}&sendTime=${encodeURIComponent(d.sendtime)}`;
        wx.navigateTo({ url: `/pages/passcode/detail/index?${qs}` });
    }
})